package com.bojin.studio.ubattery;

import org.achartengine.chartdemo.demo.chart.AverageTemperatureChart;
import org.achartengine.chartdemo.demo.chart.LevelChart;
import org.achartengine.chartdemo.demo.chart.VoltageChart;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class tabMonitor extends Activity {
    /** Called when the activity is first created. */	
	   @Override
	   public void onCreate(Bundle savedInstanceState) {
	       super.onCreate(savedInstanceState);
	       setContentView(R.layout.monitor);
	       Button b1=(Button)findViewById(R.id.button1);
	       Button b2=(Button)findViewById(R.id.button2);
	       Button b3=(Button)findViewById(R.id.button3);
	       b1.setOnClickListener(new OnClickListener() {
	            public void onClick(View v) {        	
	            	Intent intent = new AverageTemperatureChart().execute(tabMonitor.this);
	       	        startActivity(intent); 
	            }
	        });
	       b2.setOnClickListener(new OnClickListener() {
	            public void onClick(View v) {        	
	            	Intent intent = new VoltageChart().execute(tabMonitor.this);
	       	        startActivity(intent); 
	            }
	        });
	     
	       b3.setOnClickListener(new OnClickListener() {
	            public void onClick(View v) {        	
	            	Intent intent = new LevelChart().execute(tabMonitor.this);
	       	        startActivity(intent); 
	            }
	        });
	       
	   }
}
